import Vue from "vue";
import VueRouter from "vue-router";
import PageTest from "@/pages/PageTest";
import PageErr from "@/pages/PageErr";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "PageTest",
    component: PageTest
  },
  {
    // 会匹配所有路径 放在最下面处理无法匹配的路由
    path: "*",
    name: "PageErr",
    component: PageErr
  }
];
const router = new VueRouter({
  // todo     'history'需要后台配置
  // mode: 'history',
  routes
});

export default router;
